module.exports = {
  pages: {
    index: {
      entry: 'src/index/main.js',
      template: 'public/index.html',
      filename: 'index.html',
      title: '问卷星球',
      chunks: ['chunk-vendors', 'chunk-common', 'index'],
    },
    qamanage: {
      entry: 'src/qaManage/main.js',
      template: 'public/qamanage.html',
      filename: 'qamanage.html',
      title: '管理问卷',
    },
    // index: {
    //   entry: 'src/main.js',
    //   template: 'public/index.html',
    //   filename: 'index.html',
    //   title: '问卷星球'
    // },
    edit: {
			entry: './src/edit/main.js',
			template: 'public/edit.html',
			filename: 'edit.html',
			title: '编辑问卷',
		},
    fill: {
      entry: './src/fill/main.js',
			template: 'public/fill.html',
			filename: 'fill.html',
			title: '填写问卷',
    },
    login: {
      entry: 'src/views/Login/main.js',
      template: 'public/login.html',
      filename: 'login.html',
      title: '问卷星球-登录'
    },
    analysis: {
      entry: 'src/views/Analysis/main.js',
      template: 'public/analysis.html',
      filename: 'analysis.html',
      title: '问卷星球-问卷分析'
    }
  },
  devServer: {
    proxy: {
      '/api': {
        target: 'http://49.233.19.198:8090/',
        changeOrigin: true,
        // ws: true,
        pathRewrite: {
          '^/api': '/api'
        },
      },
      '/test': {
        target: 'https://apis.map.qq.com',
        changeOrigin: true,
        pathRewrite: {
          '^/test': 'https://apis.map.qq.com'
        },
      }
      // https://apis.map.qq.com/ws/location/v1/ip?key=CCYBZ-257K4-UL7UB-X4FDY-I5LNS-JMF6J

    }
  },
  configureWebpack: {
    resolve: {
      alias: {
        'assets': '@/assets',
        'common': '@/common',
        'components': '@/components',
        'network': '@/network',
        'views': '@/views',
        'img': '@/img',
      }
    }
  },
}

